package com.pig4cloud.pig.village.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 福利基金发放明细
 * @author limbray.li
 * @date 2021/6/13
 */
@TableName("collect_info")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CollectInfo {
	private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.ASSIGN_ID)
	@JsonIgnore
	private Long id;
	@JsonIgnore
	private LocalDateTime createTime;
	@JsonIgnore
	private LocalDateTime updateTime;
	@JsonIgnore
	private String createBy;
	@JsonIgnore
	private String updateBy;
	@JsonIgnore
	@TableLogic(value = "0", delval = "1")
	private String delFlag;
	@JsonIgnore
	private Integer tenantId;


	@ApiModelProperty(value = "状态值判断是否生效，0：不生效，1：生效")
	private Integer status;
	@ApiModelProperty(value = "0：村民，1：户，2：队")
	private Integer type;
	@ApiModelProperty(value = "村民id")
	private Long villagerId;
	@ApiModelProperty(value = "户id")
	private Long familyId;
	@ApiModelProperty(value = "队id")
	private Long teamId;
	@ApiModelProperty(value = "金额")
	private BigDecimal amount;
	@ApiModelProperty(value = "事件id")
	private Long eventId;
	@ApiModelProperty(value = "福利id")
	private Long welfareId;
	@ApiModelProperty(value = "年")
	private Integer year;
	@ApiModelProperty(value = "月")
	private Integer month;

	public CollectInfo(Integer status, BigDecimal amount, Long eventId, Long welfareId, Integer year, Integer month) {
		this.status = status;
		this.amount = amount;
		this.eventId = eventId;
		this.welfareId = welfareId;
		this.year = year;
		this.month = month;
	}
}
